class CreateTrafficStrategies < ActiveRecord::Migration
  def change
    create_table :traffic_strategies do |t|
      t.references :terminal_group
      t.references :account_group
      t.integer :duration_total
      t.integer :traffic_total, limit: 8
      t.integer :limit_up
      t.integer :limit_down
      t.integer :times
      t.boolean :status

      t.timestamps
    end
    add_index :traffic_strategies, :terminal_group_id
    add_index :traffic_strategies, :account_group_id
  end
end
